package com.atguigu.boot.controller;

import org.springframework.web.bind.annotation.*;

/**
 * @author : leimingchao
 * @date Date : 2021年11月14日 8:41
 */
@RestController
public class HelloController {

    @GetMapping(value = "/girl.jpg")
    public String hello() {
        return "aaaa";
    }

    // @RequestMapping(value = "/user",method = RequestMethod.GET)
    @GetMapping(value = "/user")
    public String getUser(){
        return "GET-张三";
    }

    // @RequestMapping(value = "/user",method = RequestMethod.POST)
    @PostMapping(value = "/user")
    public String saveUser(){
        return "POST-张三";
    }


    // @RequestMapping(value = "/user",method = RequestMethod.PUT)
    @PutMapping(value = "/user")
    public String putUser(){
        return "PUT-张三";
    }

    // @RequestMapping(value = "/user",method = RequestMethod.DELETE)
    @DeleteMapping(value = "/user")
    public String deleteUser(){
        return "DELETE-张三";
    }
}
